Non Patent Document 1 discloses technology for modulating a phase spectrum using a spatial light modulator (SLM) to shape a light pulse. In this document, a phase spectrum to obtain a desired light pulse waveform is calculated using an iterative Fourier method (iterative Fourier transform algorithm: IFTA). Further, Non Patent Document 2 discloses an iterative Fourier method modified to avoid a solution from being led to a local solution, in phase spectrum modulation to shape a light pulse.